Skip to content

zh-cn: fix translation error #27404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ l10n:
`nonce` 属性可用于允许对特定资源的获取,如内联脚本或样式元素。它可以帮助你避免使用 [CSP](/zh-CN/docs/Web/HTTP/Guides/CSP) `unsafe-inline` 指令,该指令会允许你获取*所有*的内联脚本或样式资源。

> [!NOTE]
> 只有在无法使用不安全的内联脚本或样式内容时,才使用 `nonce`。如果不需要 `nonce`,就不要使用。如果脚本是静态的,也可以使用 CSP 散列值来代替。(请参阅[不安全内联脚本](/zh-CN/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/script-src#不安全内联脚本)中的使用说明)。始终尽量充分利用 [CSP](/zh-CN/docs/Web/HTTP/Guides/CSP) 保护,并尽可能避免使用 nonce 或不安全的内联脚本。
> 只有在无法避免使用不安全的内联脚本或样式内容时,才使用 `nonce`。如果不需要 `nonce`,就不要使用。如果脚本是静态的,也可以使用 CSP 散列值来代替。(请参阅[不安全内联脚本](/zh-CN/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/script-src#不安全内联脚本)中的使用说明)。始终尽量充分利用 [CSP](/zh-CN/docs/Web/HTTP/Guides/CSP) 保护,并尽可能避免使用 nonce 或不安全的内联脚本。

### 使用 nonce 以允许一个 \<script> 元素

Expand Down
Loading